#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
char* my_strstr(char str1[], char str2[])
{
	char* p1 = str1;
	char* p2 = str2;
	int i = 0, j = 0;
	
		//(*(p1 + i) == *(p2 + j))
	do
	{
		
		do 
		{
			i++;
			j++;
			if (*(p2 + j) == '\0')
				return (p1 + i);
			if (*(p1 + i) == *(p2 + j))
				break;
		} while (1);
		j = 0;
		i++;
	} while (*(p1 + i) != '\0');
	return NULL;
}
int main()
{
	char str1[] = "wuhan";
	char str2[] = "ha";
	
	printf("%s", my_strstr(str1, str2));
	return 0;
}